"use strict";

const path = require("path");
const app = require("express")();
const config = require("./config");

module.exports = function(topApp){
  app.use("/session", require("./routers/session_router"));
  app.use('/light_app', require("./routers/light_app_router"));
  app.use('/notice', require("./routers/notice_router"));
  app.use('/userinfo', require("./routers/userinfo_router"));

  app.use('/admin', require("express").static(path.join(__dirname, "/www/admin")));
  app.use("/", function(req, res){
    res.send('service running')
  });
  topApp.use(config.assetsPublicPath, app);
}
